move, fix bug about changing direction