added code to notes_controller