adding common approach to display status and color code