auto alert mixin function