doing some exercises from the manning scala book