refractored status color code