add odometer code and tests