created hook for when editing is complete