added max and min for repeater