moving code from appGame to appConfig