I think that needs to cover a few lines - perhaps some val assignments. It isn't immediately apparent what the getOrElse applies to. Also instead of the getOrElse, may be a foreach...