added conditions to check if eqn is solved at the end
Merge branch 'valid_eqn'