solved problem 27, 28, 29 and 243.