add new algorithm and test