solved problem 18 and 67