Improvement of BNL algorithm