simplified the IO functions in Game