created method to mark task as done