Added the edit task function