Updated solve()