added NER inline; resolved bugs