Homework 4 tested and working