Improved Correlation Program with better variable names and better comments