minor revisions to code for generating SSAD figure -KL