Added in the beginning of problem 12