Replaced "copy()" with curl