Added Binarization code