refactoring max & min