update remove function for `Remove()`
reorganize remove function