refactored tasks to be events

refactoring tasks