possibly ?final version of code for  movement