add window and event class