added reading function for mat files
added xpp type