change rules to modal