implementation of delete/remove