finish scala day3 exercise2