some changes in NLP code