First part of comparator implemented and tested