added binarizer and fixed some bugs