smote in C, much better speed