fixed comparator and adder, no more outstanding bugs