better alert implementation