give correct levels in factor replacement