porting changes to v3