read and write existing data to map