Tried a case with 2 schools and 3 students where quotas were 1 and 2 but each school/student had the same preferences, and it breaks the code. I think the pairs dropped shouldn't be all but the first one, instead it should be based on the school's quota.