Scala Day 1 exercise