Added timed events functionality