working on segments and segment joints