Renamed serialize => encode