Needs Indices Extraction Function