new implementation of gradient boosting with losses