minLabel refactoring 2