Add function to mark tasks as complete.