cleaned up win logic