Updated to 1.7 code