changed smoothing function to step function on dyadic points