clean and finish solver beta version