added game initialization logic