added code to reformat accounts