add load subdirectries func