changed integrate class function to integral