fixed movement code