Edited for part 1 of HW6