added map for pairs