The effect of rare-earth (La, Sm, Dy, Ho and Er) and Mg on the microstructure in BaTiO3