validSol should work now

alg doesn't always work :(