new function identity; more tests for lib_matrix