move flag-stronger check out of kde algor function