Started Peter's code for HW6.