add compareTo method to GroupData