integrating matrix library