update sample code so it compiles

make it a little more friendly for first time cut and paste