refactor fillMissingLabels to be more efficient