Added comments to sample code