factored out sequence integrator for testing