polylinear cleaned up