implemented rm method