use hash for indexing