separate main and index views