new library for matrix