Fixed calculations and add a method to return a distance based on durati...

Added method and fixed cal