update terminal algorithm and default cfg value