Functionalizate correlation part from main program