integrator: made it Py3-compatible