moved logic to clone method