Initial commit
refactoring of the map function. well , it is not required:)