final version of solver