add matrix stuff