module to encode and decode objects
