refactoring startight path and simple path. calculating polygons