adding alerts snippet