add method to copy directories and main class