b_search now made into a class and implements OOP style