added statistics, improved game handling