cleaned up hour equation