coursera scala assn 2, 2nd submission: 100%