roll my own serializer