Operation on a tree through making it foldable