Adding my code for part A of the HW...hopefully it works