added generic opsetting for Matrices