add logic to determine winner