change interface `Messages` to `(String) => Option[String]`