created method to edit tasks from the to do list