use the matrix to transform, and try to fix a gcov error in travis-ci