Effect of alloying on the phase transformation and magnetic shape memory in Ni-Mn-Ga compounds