put in the snake function