Update comparator.cpp