Wrote a Map function.