added collision detection for snake body