micro-refactoring of max/min 'Shape' functions