fixed some typo's and made some analytic changes