more sophisticated method of entity recognition