finished basic move code