generalize scope cloning