make directory traverse better