reformat factorial