now use index number in main view