add Scala-like pattern matching