first version of index creation script