fix the note function