better index matching