matrix code args refactoring