Scala exercise part 4 done