merging SSL code for edit and delete