fixed evaluation to keep all branches and to handle hierarhies