refactored min/max approaches