added config file, updated connection to db