making mapper functions dry
Merge pull request #32 from foundersandcoders/d-r-y-code!

making mapper functions dry