some work on polyline, untested