porting to 3.5.1