added some code to process note on events