added function bs_contains