serializer for nodes