added comments to binary search