adapted to new version of package robustHD