handle sub-directories