Added event handling for back-end
Added event handling for backend