some half-thought alg to leave some names intact