Should work for all matrices now

Not as elegant anymore. :-/