added recursive cloning