add index and script