changed size of matrix and number of times it runs.