some preliminaries to min max