Refactor calculations in time to complete