update new algorithm