adding code for database connection and config file