added get() function to mat class