Adapted for Scala 2.10