refactored database config file