snapshot binary search implemented