added snake movement and direction