use integral for slice