Small changes trying to get math into matrix form