refactored gem_copy into a function and fixed error message
Fixed method definition