fixing up tests and a comparator