changing controller to event consumer