Have a workable solution for hw3 p3. Still need to refactor, but works.
Tweaks for latest hw assignment