create index and dir structure