Update README.md

First I made the change using map. Made a function so you can call on it. Second I cleaned up all the code in order to display the changes a little better.
Merge pull request #3 from jdeno/patch-1

Update README.md