improve create indices script