minor refactorings (colors and logic)