added a caverage treshold