refactor matrix