added Object encoder/decoder