implementing select and compare pages but not finished yet