Refactoring Editing Action Code, Putting it in its own function, Calling the function on click of btn 'Edit'