solved problem 16, 17, 18 and 67