humm - sorting logic