cleaned AdaBoostR code