I changed this by turning a cache mean into a cache matrix inverstion.
This is good because it was a ton of fun and I learned something in the process.