add scala pattern.