Update code for scala 2.10