matrix class: method added for getting a sub matrix