Implements alert handling method