first connection to database