Updated with naive matrix multiplication