problem 12
merged