saving changes for hooks