added chapter17 advdiff