Made the sample code easier to understand