updated index to use main