first copy, fix namespaces