implement rm()