messy code for the snake