Cleaned up getETA() function