create index and tests