started using var in snake.js