Programming assignment 2 for rProg coursera course (week 3) ready