use local variable and return the note instead of a boolean

Fixes 606559faad29ab7468e4de26fc75951d4fa5d407