add alert handling