add basic_alg: method one