added multiple polylines support