Adding reduce polyfill
Makign reduce logic more obvious