work with riemann intergration