add tests for util matrix