revision 2

added classful design to comparator functionality