better data structure for indexed key lookup