Added a primitive check win fucntion