rm master detect fn