slight changes to connect and set up tables