some algorithm samples in educational purposes (not guaranteed to work )