add index and initial script.