update NLP code