adding the map method for type convert.