restructuring how the comparisons are made. fixes #2