only building the tables once, not twice