connecting to database - check