added matrix library (not complete)