add subdirectory support