winning solution checking without much cleaning