adding switches between two sides of tree