convert filter so it does not generate temporary
rework to separate out shared state; much cleaner
Fix reduce
make matrix mult example work