Wrote the saveCharacterData procedure