move copy_from_repo method to start of script