updated integrale function