notes function updated