add in pair, left and right for map function