[formatter]  refactory the code