Add Matrix implementation