added matrix initialization