added win conditions to js