use scheduleRun instead of reusing setTimeout