sqlite gem: solution
updated unworking binary search