implemented setTimer and checkTimer