change rules, add tests