Updated code with October 10th e-mailed changes