first nontrivial snake. need better algorithm.