Added the code to distingush if the update or delete was clicked.