Update patterns.scala