updated for scala 2.11