added trip length support