Implement alerts

#141 
hard to follow better to move to own variable (and coding standards)