Added in function to actually connect to database