Added event handler (add and delete functinalities