Some algorithms for practice