Toward more abstraction for MultipleShooting example
don't hardcode N