fix binary search
collect some basic stats about clamping