bug: Fix copyTo

fixes the copyTo functionality and adds basic tests