rm: duplicated logic