bugFix & chenge of an algorithm