add changeMax() to change factory.max dynamic