added Context::solve method