Cleaned up Problem 4