the algorithm might be confusing since I made up a bunch of words. adding debugging messages as I go to clear things up