cleaning up matrix_utilities