problem 1 in Scala wooooo