adding test for encode/decode
improving gob encoding/decoding test