utilities for scala.