stopped snake from eating its neck, next: refactor