                 }
             }
             
-            if let transactions = data["transactions"] as? [JSON], accounts = data["accounts"] as? [[String : AnyObject]], accountData = accounts.first {
-                print(transactions)
+            if let transactions = data["transactions"] as? [JSON],
+               let accounts = data["accounts"] as? [[String : AnyObject]],
+                let accountData = accounts.filter({ $0["_id"] as? String == account }).first {
                 let plaidTransactions = transactions.map { PlaidTransaction(transaction: $0) }
                 callBack(response: response.response!, account: PlaidAccount(account: accountData), plaidTransactions: plaidTransactions, error: nil)
             }

                                                          "options" : options]
        
        Alamofire.request(.GET, plaidURL.connect, parameters: downloadCredentials).responseJSON { response in
            print(response)
            guard let data = response.result.value as? JSON else { return }
            
            if let code = data["code"] as? Int {

                completionHandler(response: nil, institutions: [])
                return
            }
            let intuitInstitutions = json.map { PlaidInstitution(institution: $0, source: .intuit) }.flatMap { $0 }
            completionHandler(response: response.response, institutions: intuitInstitutions)
        }
