simplified usage of matrix type