Add a logic updatecontents of selected memo