refactor test and change getcopy to clone