add stack for from bottom to root