Adding matrix lib