Rewrite compare.hpp