[update] modification on changing direction of the snake