created function to enable saving games to disk