refactor section copying