replace the if-else with a switch
Add EVENT_TASK_DONE handling
Editing a task added