refactored db configuration to fit shell script
minor refactor