entity understnding logic added