added events controller and events stuff