added Matrix clas