add matrix ns