adding alerts and flashes