refining hte payroll calculation