add implementation of reductions.

apparently a previous git-add did not stick.