added getWarningMessage method