add copy modules
code refactoring