timer: pass controller to setTimeout and setInterval functions