Coursera rprof-007 programming assignment 2