add Chain of responsiblity pattern in scala.