Scala Parameterized Method