now edit func with root is complete