added matrix fetching