updated database connection class to allow setting of pdo by external modules