added binary search to wed