smaller matrix serialization