more work on porting the 1.7 code to 1.8