Fix algorithm in ex3-19