applied binary search 

become mach faster