finish graph + recording distance and time