adding bloom filter and reworking scanning logic