Implement bsearch and _bsearch methods