updated version of move code