initial bpt algorithm
Added a test for the BPT