created test for horizontal and vertical segments