Changed function to except type String form mapData function