added the fucntionality for the add task function