reworking bson serializer to work better