refactored win algorithm
removed old win check algorithm and added new