added collision detection for snake with self