more algorithms, all passing tests