updated the copyTo function to idiomatic Go
Fixing a typo in the last commit :/