moving to a new directory and extracted method to lower complexity