fixing reduce now...
much better impl for reduce