move to root optimization