update remove logic