updated matrix and vector classes.