adding alert mechanism