generator refactoring. added getNext() color method