Integral function implemented