format data. store in dictionary