Creation of returnIndex main sub object.