incorporated dain's changes and added recurring events to the events model and scheduler task