adding BBP algoithm