implemented ubl sorting in compute_UBL. tests passed