updating some nlp code