code added to indx