fixed the log bug
sample_upper_bound function created