Altered where time funciton was