Solved extra credit #4