adding initial code manipulate matricies