fixed everything except winner logic