main to index