Added event scheduling to improve performance