for middleware and porting_can