Add implementation of comparator