connect to database each time