initial commit exercise 4, provided code skeleton for matrix task