added matrix methods