added max setting