Matrix version, still some weird bugs.