Got fetchNoteType function to work