partially fixed movement code
.