changed run_until to run in EventHandler