modify note sample code.