added tests for algorithms, and fixed param case