marks previous task as done and adds a new task