updated 'remove' definition