adaboost algorithm
add some basic functions