moved attend to event method from controller to model