add and edit task, plus tests