added search condition for avalanche effect