added win4 condition and restored allSolns code