breaking up the functionality of advanceTime