fixed compareTo() to sort by reverse code length