Solution to Problem 4: