implement solver