modified decision tree serializer