updated search to use index of item