Minor refactor we changed in class with color switch statement, to avoid repeated code