change functions names in algorithm.php