rewriting a good portion of the guts... was getting too complicated and needed to be simplified