Rewrote comparison function, added color coding