Basic algorythms for practice