added function to measure the entropy of the search area