changed function name to GameLoop