moving set attributes from leaf color to base class and refactoring leaf line to use pattern