convert data to map