changed integration method working now