make it possible to set max value after construct