finished the recursive solver, now requires is legal