Refactoring of min.'s