perfectly working copy except for the insertion operator overload