Solution to Problem #4 complete