Added vectorization to binarize