serialization of game