The work of river in middle course is mainly?