trying to get pc correlation curve fitting working