copy statements should be nserted before branches