Switch with reggae for applying rules.
Added min and max rule