stuff for connecting to the database