correct the logics in avg_less and avg_more