various algorithms

2022