Changed data structure to Data.Map