added r^2 calculations of phase fit