changing the min max call to the init