Better mapData function and format