In this paper, as an extension of pairwise PEE [19], a novel RDH scheme based on 2D-PEH modification is proposed. By formulating the expansion bins selection as an optimal path based embedding, the proposed method can obtain the histogram modification mapping adaptively. Experiment results are presented, which demonstrate the superior of the proposed scheme in terms of capacity-distortion performance. The main advantage of our method is to provide an adaptive way to design the histogram modification manner. However, one drawback of pairwise PEE and the proposed method is its capacity limitation, since the modification to each pixel value is at most 1 in the data embedding procedure. Then, a possible direction for the future work is how to increase the embedding capacity of pairwise embedding while keeping a high marked image quality.