refactor ad hoc serializers