updated move code