finish new algorithm