Fixed coloring issue and switched to switch-case