messing with different ways, good and bad, to do problem 4