snake.html refactor fix