modified sample codes on top of the file