         @_merge_remote_notes(data['notes'])
         # FIXME need to use promise
         return @get_all_notes()
+
+  # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Merge/Sync Operations >
 
   # ------------------------------------------------------------
   # merge remote note list into local note list db

          @delete_note(n.guid)
          console.log('local note ' + n.guid + ' deleted.')

  # --------------------------------- DB operations ---------------------------------
  get_all_notes: () =>
    return @db_server.notes.query().all().execute()


    # check if the note to be loaded is already current note
    if guid != vm.note.guid
      vm.open_loading_modal()
      noteManager.fetch_remote_note(guid).then(
        (note) ->
          # TODO handle other status
          # extract markdown
          md = note.md
          vm.set_md_and_update_editor(md)
          # render html
          vm.render_html($('#md_html_div'))
          # set note info
          vm.note.guid = note.guid
          vm.note.title = note.title
          # close modal
          vm.close_loading_modal()
        (error) ->
          alert('load note failed: ' + JSON.stringify(error))
          vm.close_loading_modal()
      )

  # ------------------------------------------------------------------------------------------------------------------
  # App Status
