started adding subdirectory support