alert after updating/saving + refactoring