Removed debug statementi
Refactored db connection method