added optional parameter and documentation for copy-port