first working version of P.A.2
Merge https://github.com/dovlaj/ProgrammingAssignment2