improved solver