clarify and fix alert method