matrix library finalized