added safety copy-ending