fixing game timer by passing arguments to runFunction