established connectin to db