updated main and index