updated comparator and such