was translated from freeplane, but no need for loop