updated matrix and color classes.