Factors influencing the development of two-way shape memory in NiTi