Create main-match

main function return the degree of correlation