HomeWork 03_12_14

The same code from last week synthesized into a couple of functions