added fit_polylines