Implement matrix version of algorithm
Add output from test runs