more porting to new APi