change rmdir method