edited to include alerts