trace root recursively