new BM
new BM algorithm