Preparing solver