copy indexto main