updated some alert code