Added deepCopy() function and am now calling from in set().