smarter rm()