add example returning indices