wrote workbook up to matrix algebra