replaced integral solution with riemann sums