changed seg1 to seg2 on line 406