parameterizing the marix dimensions