added proper serializer for metadata