change bsearch to return nil