final code to display badge for severity