Adding new solver constructor.