minor
function to compute total hours