fixed motor movement code