added alerts when saving