set max method