copy and copyFrom

+ write fix
tests