changed to clone cases at every level of the tree