final impl of the ecore pruner