fix remove function
fixed remove function