function to process index-out option