1. update algo varible to function parameters. 2. add test function.