added code for basic binary search