refactored out processSingleAccount