functionality to build global feature map