added and solved problem 2