Added the comparator to add and remove fns