added gpx output support, WIP