big rewrite
win condition added