added missing $this infront of copy function call