Alloying of impurity materials