simplify reducer

I'm still troubled by the reducer's lack of idempotence. I need to fix
that.
make reducer() idempotent