kernel returning array of index's