Here is my updated HW3. It has a function!