index switched to use main layout