add correlation length calculation