I think solve already does this automatically.