added partial support for copying