updated cloning method