reorder the action so that the tree is there to work with or to remove in the right order