Implemented EX04 Comparator version