add note save logic