added code for DB connection