updated to copy handle objects