Start to implement Pairwise Algorithm

Not finished yet