almost done with a bit of linear algebra