fixed bsearch again