added haskell binary search