matrix power. fixes #33