modified integrate