implement template subdirectories