modifying index for directory structure