code for play for scala book