establishes winning conditions, fixes firing bugs