Solved problem #6