Added getPendingAccounts functionality