figure out average speed