update head of snake