add warning and critical method