move main to index