changes in Solve() method