using hash function to accelerate the query speed, perfect