correcting typos and adding more coments
removed unused map reduces