refactoring + color change event added