changed mvc to event driven