Huge-ass matrix and code to go with it