colors and some refactoring