updated code to allow for alerts demo.