add rule
refactor recurse() a bit