work in correlation.cpp