Updated code with recursive call to populate all sub accounts.