implementations of various algorithms, just as practice