add modified timer function