implemented basic cloning