implemented cloning