solved problem 77