working through a splitting directory tree method