cheap and dirty problem 5