refactored List and added pairwise problem

refactored List and added pairwise problem