added alerts and confirms