Added distance traveled functionality