added logic for miles to empty tank and total trip miles