programing exercise 2
better design plan