added foreign accounts support