Figured out local matrix manipulations