work on segments