more proof work, fixed reduce, added agmon correctness