wrote tests for alerts