rebinning fixed version3