trudge through chapter 3

thanks ramnath for plyr elegant code