solve() working correctly