Added correlation functionality which solved #8.