add matrix library