learn algorithm for myself