add encodable/decodable support