matrix class added for real