added switch statment for rules