Scala assignment 3 coursera