scala week 1 homework