Added sample code to ch07