as submitted for hw 6a