Added buildMap()