debugging; placed try-catch block at db connection