added matrix library