implement of bloom filter (not well tested)